<template>
  <div>
    <h1>Header</h1>
    <div>我是哥哥我开的车是{{ car }}</div>
    <button @click="changeCar">点击换车</button>
  </div>
</template>

<script>
export default {
  name: "Header",
  props: ["car", "changeCar"],
  beforeCreate() {
    console.log("****beforeCreate****");
  },
  created() {
    console.log("****created****");
  },
  beforeMount() {
    console.log("****beforeMount****");
  },
  mounted() {
    console.log("****mounted****");
  },
  beforeUpdate() {
    console.log("****beforeUpdate****");
  },

  updated() {
    console.log("****updated****");
  },

  beforeDestroy() {
    console.log("****beforeDestroy****");
  },
  destroyed() {
    console.log("****destroyed****");
  },
};
</script>

<style>
</style>